Skip to main content

PDF Generator API

This document highlights the PDF Generator API details.

API Description

Objective

The PDF Generator API generates a redirection link required for Aadhaar OTP-based eSign processes. The API facilitates digital signatures for document signing and redirection.

InputOutput

The invitee details such as their name, phone and email

The redirection link for Aadhaar OTP-based eSign, along with the document ID, signer email, status code, and signer name

Note
An invitee is the individual whose Aadhaar-based digital signature is required on the document

API URL

https://ind-engine.thomas.hyperverge.co/v1/pdfGenerator

API Endpoint

pdfGenerator

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the complete information on all the input parameters for the API.

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
templateIdThe unique Template ID each userOptional
info
To be entered when the PDF is generated in-house
Not ApplicableNot Applicable
inviteeNameThe name of the signerMandatoryNot ApplicableNot Applicable
inviteePhoneThe phone number of the signerOptionalNot ApplicableNot Applicable
inviteeEmailThe email ID of the signerOptionalNot ApplicableNot Applicable
stampSeriesThe series of stamps, if they are being utilized in the journeyOptionalNot ApplicableNot Applicable
eSignHintMessageMandatoryNot ApplicableNot Applicable
coordinatesThe Coordinates for signing location on the PDF documentOptional
info
To be entered when the PDF isn't generated in-house
Format: "x1": 0, "x2": 50, "y1": 0, "y2": 50, "page": 1Not Applicable
fileThe file in Base64 format, used when the PDF is not generated by the system.Optional
info
To be entered when the PDF isn't generated in-house
Not ApplicableNot Applicable

Request

The following code snippet demonstrates a standard curl request for the API:

curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/pdfGenerator' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"templateId": "<Enter_the_unique_template_ID>",
"inviteeName": "<Enter_the_name>",
"inviteePhone": "<Enter_the_phone_number>",
"inviteeEmail": "<Enter_the_email_address>",
"stampSeries": "<Enter_the_stamp_series>",
"eSignHintMessage": "<Enter_the_eSign_hint_message>"
}'

Success Response

The following is a success response from the API:

{
"status": "success",
"statusCode": "200",
"result": {
"data": {
"signUrl": "<Redirection_Link_For_Aadhaar_OTP_eSign>",
"documentId": "<Document_Identifier>",
"email": "<Email_of_the_Signer>",
"name": "<Name_of_the_Signer>",
"phone": "<Phone_Number_of_the_Signer>"
}
}
}

Success Response Details

The following table highlights the details of the success response from the API:

ParameterTypeDescription
statusCodeintegerThe status code of the response
metaDataobjectThe metadata associated with the request
metaData.requestIdstringA unique identifier for the request
metaData.transactionIdstringA unique identifier for the transaction
resultobjectThe result object containing the response data
result.dataobjectThe data related to the sign URL and document details
result.data.signUrlstringThe URL for signing the document
result.data.documentIdstringThe unique identifier for the document
result.data.emailstringThe email address of the person to sign the document
result.data.namestringThe name of the person to sign the document
result.data.phonestringThe phone number of the person to sign the document

Error Response Samples

The following are some sample error responses from the API.

{
"status": "failure",
"statusCode": "400",
"result": {
"error": {
"message": "Required file input is missing"
}
}
}

Error Response Details

A failure or error response from the module contains a failure status, with a relavant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
400Required file input is missingThe request is missing the required file input
400Error while parsing file inputThe system encountered an issue while parsing the file input
500Unknown error while parsing inputsThe request failed due to an unknown error during input parsing
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
500PDF generation failedThe system failed to generate the requested PDF
503External vendor downtimeThe external vendor is currently down. Error code: EXTERNAL_DOWNTIME
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: